Ignore scroll events from the content of the page. (#148409, Gabriel de
authorMatthias Clasen <maclas@gmx.de>
Sun, 25 Jul 2004 23:53:15 +0000 (23:53 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 25 Jul 2004 23:53:15 +0000 (23:53 +0000)
Sun Jul 25 19:51:17 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
events from the content of the page.  (#148409, Gabriel
de Perthuis)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtknotebook.c

index a1c1a72f90bcd511ea31a9e717ca0d6b8e7070a8..0c3e2677e86338f6c7552fabe0166586cc686ed2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+       events from the content of the page.  (#148409, Gabriel 
+       de Perthuis)
+
 Sat Jul 24 21:38:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
index a1c1a72f90bcd511ea31a9e717ca0d6b8e7070a8..0c3e2677e86338f6c7552fabe0166586cc686ed2 100644 (file)
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+       events from the content of the page.  (#148409, Gabriel 
+       de Perthuis)
+
 Sat Jul 24 21:38:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
index a1c1a72f90bcd511ea31a9e717ca0d6b8e7070a8..0c3e2677e86338f6c7552fabe0166586cc686ed2 100644 (file)
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+       events from the content of the page.  (#148409, Gabriel 
+       de Perthuis)
+
 Sat Jul 24 21:38:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
index a1c1a72f90bcd511ea31a9e717ca0d6b8e7070a8..0c3e2677e86338f6c7552fabe0166586cc686ed2 100644 (file)
@@ -1,3 +1,9 @@
+Sun Jul 25 19:51:17 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtknotebook.c (gtk_notebook_scroll): Ignore scroll
+       events from the content of the page.  (#148409, Gabriel 
+       de Perthuis)
+
 Sat Jul 24 21:38:12 2004  Soeren Sandmann  <sandmann@daimi.au.dk>
 
        * gtk/gtktoolbar.c (internal_insert_element): Warn if you try to
index 751c0ae0b305f28b1f055f47f7448d1ec06e13b3..88d6091042a02e9a64ee570712499111406d7426 100644 (file)
@@ -1767,6 +1767,19 @@ gtk_notebook_scroll (GtkWidget      *widget,
 {
   GtkNotebook *notebook = GTK_NOTEBOOK (widget);
 
+  GtkWidget* child;
+  GtkWidget* originator;
+
+  if (!notebook->cur_page)
+    return FALSE;
+
+  child = notebook->cur_page->child;
+  originator = gtk_get_event_widget ((GdkEvent *)event);
+
+  /* ignore scroll events from the content of the page */
+  if (!originator || gtk_widget_is_ancestor (originator, child))
+    return FALSE;
+  
   switch (event->direction)
     {
     case GDK_SCROLL_RIGHT: